<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <style>
        ul{
            list-style: none;

        }
        ul  li{
            width: 120px;
            height: 40px;
            float: left;
            position: relative;

            transform-style: preserve-3d;

            transition: transform  2s  ;
        }
        ul  li  span{
            position:absolute;
            top: 0;
            left: 0;

            width: 100%;
            height: 40px;
            text-align: center;
            line-height: 40px;
        }

        ul  li  span:nth-child(1){
            background-color: yellow;
            transform:translateZ(20px);
        }

        ul  li  span:nth-child(2){
            background-color: pink;
            transform:translateY(-20px) rotateX(90deg);
        }

        ul li:hover{
            transform: rotateX(-90deg);
        }


    </style>
</head>
<body>
    <ul>
        <li>
            <span>web</span>
            <span>js</span>
        </li>

        <li>
            <span>web</span>
            <span>js</span>
        </li>

        <li>
            <span>web</span>
            <span>js</span>
        </li>

        <li>
            <span>web</span>
            <span>js</span>
        </li>
    </ul>
</body>
</html>